#pragma once
#include "Utilies.h"
#include <string>


namespace vkengine
{
	class Device;
	class Pipeline
	{
	public:
		void CreateRenderPass(Device* device, VkFormat swapChainImageFormat);
		void CreateDescriptorSetLayout(VkDevice device);
		void CreateGraphicsPipeline(VkDevice device);

		VkShaderModule CreateShaderModule(VkDevice device,const std::vector<char>& code);

		static std::vector<char> ReadFile(const std::string& filename);

		void Cleanup(VkDevice device);

		VkRenderPass GetRenderPass() { return m_RenderPass; }
		VkPipeline GetGraphPipeline() { return m_GraphicsPipeline; }
		VkDescriptorSetLayout GetDescriptorSetLayout() { return m_DescriptorSetLayout; }
		VkPipelineLayout GetPipelineLayout() { return m_PipelineLayout; }

	private:
		VkRenderPass m_RenderPass;
		VkDescriptorSetLayout m_DescriptorSetLayout;
		VkPipelineLayout m_PipelineLayout;
		VkPipeline m_GraphicsPipeline;
	};
}


